import request from '@/utils/request'

// 删除商品信息
const deleteTrademark = function (id) {
    return request.delete(`/admin/product/baseTrademark/remove/${id}`)
}

// 添加或修改品牌信息
const addTrademarkOrUpdate = function (trademark) {
    if (trademark.id) {
        return request.put('/admin/product/baseTrademark/update', trademark)
    } else {
        return request.post('/admin/product/baseTrademark/save', trademark)
    }
}

// 获取品牌列表
const getTrademarkList = function (page, limit) {
    return request.get(`/admin/product/baseTrademark/${page}/${limit}`)
}

export default {
    deleteTrademark,
    addTrademarkOrUpdate,
    getTrademarkList
}


